package com.fesine.quartz.chapter4;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.impl.StdSchedulerFactory;

/**
 * @description: 类描述
 * @author: Fesine
 * @createTime:2016/11/19 15:41
 * @update:修改内容
 * @author: Fesine
 * @updateTime:2016/11/19 15:41
 */
public class Listing_4_3 {
    static Log logger = LogFactory.getLog(Listing_4_3.class);

    public static void main(String[] args) {
        Listing_4_3 example = new Listing_4_3();
        example.startScheduler();
    }

    public void startScheduler() {
        try {
            Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler();
            logger.info("scheduler is starting.");
            scheduler.start();
        } catch (SchedulerException e) {
            e.printStackTrace();
        }
    }
}
